<template>
    <ul class="list-group">
      <li class="list-group-item"  style="background-image: linear-gradient(to top, #6a85b6 0%, #bac8e0 100%);color: #fff;display: flex;font-size: 16px;">
        <div style="width: 6px ;height: 16px;background-image: linear-gradient(180deg, #2af598 0%, #009efd 100%);;margin: 4px 2px"></div><strong>{{datalist.title}}</strong></li>
        <li class="list-group-item">
            <div class="form-check" v-for="(item,index) in datalist.sysAnswerList" :key="index" style="margin: 12px 0;font-size: 14px;">
                <input type="checkbox" :name="'checkbox'+datalist.questionId" class="form-check-input" v-model="aa"  :value="item.answerId"  >{{ item.answerContent}}
            </div>
        </li>
</ul>
</template>
<script>

	export default {
          name: 'CheckboxView',
          props:{
            datalist:Object,
            questionnaireId:0
          },
	data() {
		return {
		aa:[],
		};
	},
    watch:{
        aa(newValue, oldValue){
            console.log('被选中的值为:'+newValue)

            let _a={'questionnaireId':this.questionnaireId,'questionId':this.datalist.questionId,'answerId':newValue}


                this.$emit('ontest', _a)

        }

    },
  methods:{

  },
     
}                           
  </script>
<style>

</style>